package com.learn.demo;

import com.learn.demo.entity.Computer;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringDemoMain {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Computer computer = context.getBean("computer", Computer.class);
        System.out.println(computer);
        Computer computer1 =  context.getBean("computer1", Computer.class);
        Computer computer5 =  context.getBean("computer5", Computer.class);
        System.out.println(computer == computer1);
        System.out.println(computer1 == computer5);
    }
}
